<%@page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/taglib/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/taglib/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/taglib/struts-logic.tld" prefix="logic"%>


<div id="content">
	<table class="custom_table" style="width: 500px; max-width: 500px;">
		<tr  class="header_row">
			<th style="width: 200px; max-width: 200px;"><bean:message
					key="common.messages.discipline" /> :</th>
			<th><bean:write name="messageForm"
					property="messageAnswer.messageSubject" /></th>
		</tr>
		<tr>
			<td><bean:message key="common.messages.user_from" /> :</td>
			<td><bean:write name="messageForm"
					property="messageAnswer.userFrom.userSurname" /> <bean:write
					name="messageForm" property="messageAnswer.userFrom.userName" />
			</td>
		</tr>
		<tr>
			<td><bean:message key="common.messages.email" /> :</td>
			<td><bean:write name="messageForm"
					property="messageAnswer.userFrom.email" />
			</td>
		</tr>
		<tr>
			<td><bean:message key="common.messages.date" /> :</td>
			<td><bean:write name="messageForm"
					property="messageAnswer.messageDate" />
			</td>
		</tr>
		<tr>
			<td><bean:message key="common.messages.message" /> :</td>
			<td><bean:write name="messageForm"
					property="messageAnswer.messageBody" />
			</td>
		</tr>
		<tr>
			<td><bean:message key="common.links.file_path" /> :</td>
			<td><html:link action="/message.do?method=download">
					<bean:write name="messageForm" property="file.name" />
				</html:link>
			</td>
		</tr>
	</table>

	<html:form action="/message/answerStudent" method="post"
		enctype="multipart/form-data">
		<table class="custom_table">
			<tr>
				<td>
					<bean:message key="common.messages.message" /><span
					style="color: red;">*</span> :<br />
					<div style="color: red; font-size: 11px;">
						<html:errors property="message" />
					</div>
				</td>
				<td id="message"><html:textarea cols="40" rows="8"
						name="messageForm" property="message" />
				</td>
			</tr>
			<tr>
				<td>
					<bean:message key="common.messages.attach_file" /> :<br />
					<div style="color: red; font-size: 11px;">
						<html:errors property="fileAttach" />
					</div>
				</td>
				<td><html:file name="messageForm" property="fileAttach" />
				</td>
			</tr>
			<tr>
				<td></td>
				<td><html:submit property="method" value="send" />
				</td>
			</tr>
		</table>
	</html:form>
</div>